package com.lcc.gulimall.ware.feign;

import com.lcc.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Feign Service的两种写法
 * 1.要让所有请求过网关
 *   @FeignClient("gulimall-gateway")：给gulimall-gateway所在的机器发请求
 *   @RequestMapping("/api/product/skuinfo/info/{skuId}")
 * 2.直接让后台指定服务处理
 *   @FeignClient("gulimall-product")
 *   @RequestMapping("/product/skuinfo/info/{skuId}")
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
